home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat4 / inode.z / inode
Encoding:
Text File  |  2002-10-03  |  6.9 KB  |  199 lines

  1.  
  2.  
  3.  
  4. iiiinnnnooooddddeeee((((4444))))                                                              iiiinnnnooooddddeeee((((4444))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      inode - format of an Extent File System inode
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ppppaaaarrrraaaammmm....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////ffffssss////eeeeffffssss____iiiinnnnoooo....hhhh>>>>
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      An _i_n_o_d_e is the volume data structure used by the Extent File System
  17.      (EFS) to implement the abstraction of a file.  (This is not to be
  18.      confused with the _i_n-_c_o_r_e _i_n_o_d_e used by the operating system to manage
  19.      memory-resident EFS files.)
  20.  
  21.      An inode contains the type (for example, plain file, directory, symbolic
  22.      link, or device file) of the file; its owner, group, and public access
  23.      permissions; the owner and group ID numbers; its size in bytes; the
  24.      number of links (directory references) to the file; and the times of last
  25.      access and last modification to the file.  In addition, there is a list
  26.      of data blocks claimed by the file.
  27.  
  28.      An inode under the Extent File System has the following structure.
  29.  
  30.           #define   EFS_DIRECTEXTENTS   12
  31.  
  32.           /*
  33.            * Extent based filesystem inode as it appears on disk.
  34.            * The efs inode is 128 bytes long.
  35.            */
  36.           struct    efs_dinode {
  37.                ushort    di_mode;       /* type and access permissions */
  38.                short     di_nlink;      /* number of links */
  39.                ushort    di_uid;        /* owner's user ID number */
  40.                ushort    di_gid;        /* group's group ID number */
  41.                off_t     di_size;       /* number of bytes in file */
  42.                time_t    di_atime;      /* time of last access (to contents) */
  43.                time_t    di_mtime;      /* of last modification (of contents) */
  44.                time_t    di_ctime;      /* of last modification to inode */
  45.                long      di_gen;        /* generation number */
  46.                short     di_numextents; /* # of extents */
  47.                u_char    di_version;    /* version of inode */
  48.                u_char    di_spare;      /* UNUSED */
  49.                union {
  50.                     extent    di_extents[EFS_DIRECTEXTENTS];
  51.                     dev_t     di_dev;   /* device for IFCHR/IFBLK */
  52.                } di_u;
  53.           };
  54.  
  55.      The types _u_s_h_o_r_t, _o_f_f__t, _t_i_m_e__t, and _d_e_v__t are defined in _t_y_p_e_s(5).  The
  56.      _e_x_t_e_n_t type is defined as follows:
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. iiiinnnnooooddddeeee((((4444))))                                                              iiiinnnnooooddddeeee((((4444))))
  71.  
  72.  
  73.  
  74.           typedef struct extent {
  75.                unsigned int
  76.                     ex_magic:8,    /* magic #, must be 0 */
  77.                     ex_bn:24,      /* bb # on volume */
  78.                     ex_length:8,   /* length of this extent in bb's */
  79.                     ex_offset:24;  /* logical file offset in bb's */
  80.           } extent;
  81.  
  82.      _d_i__m_o_d_e contains the type of the file (plain file, directory, and so on),
  83.      and its read, write, and execute permissions for the file's owner, group,
  84.      and public.  _d_i__n_l_i_n_k contains the number of links to the inode.
  85.      Correctly formed directories have a minimum of two links:  a link in the
  86.      directory's parent and the `.' link in the directory itself.  Additional
  87.      links may be caused by `..' links from subdirectories.
  88.  
  89.      _d_i__u_i_d and _d_i__g_i_d contain the user ID and group ID of the file (used to
  90.      determine which set of access permissions apply:  owner, group, or
  91.      public).  _d_i__s_i_z_e contains the length of the file in bytes.
  92.  
  93.      _d_i__a_t_i_m_e is the time of last access to the file's contents.  _d_i__m_t_i_m_e is
  94.      the time of last modification of the file's contents.  _d_i__c_t_i_m_e is the
  95.      time of last modification of the inode, as opposed to the contents of the
  96.      file it represents.  These times are given in seconds since the beginning
  97.      of 1970 GMT.
  98.  
  99.      _d_i__g_e_n is the inode generation number used to sequence instantiations of
  100.      the inode.
  101.  
  102.      An extent descriptor maps a logical segment of a file to a physical
  103.      segment (extent) on the volume.  The physical segment is characterized by
  104.      a starting address and a length, both in basic blocks (of 512 bytes) and
  105.      a logical file offset, also in basic blocks.
  106.  
  107.      _d_i__n_u_m_e_x_t_e_n_t_s is the number of extents claimed by the file.  If it is
  108.      less than or equal to _E_F_S__D_I_R_E_C_T_E_X_T_E_N_T_S then the extent descriptors
  109.      appear directly in the inode as _d_i__u._d_i__e_x_t_e_n_t_s[_0 .. _d_i__n_u_m_e_x_t_e_n_t_s-_1].
  110.      When the number of extents exceeds this range, then _d_i__u._d_i__e_x_t_e_n_t_s[_0 ..
  111.      _d_i__u._d_i__e_x_t_e_n_t_s[_0]._e_x__o_f_f_s_e_t-_1] are indirect extents that map blocks
  112.      holding extent information.  There are at most _E_F_S__D_I_R_E_C_T_E_X_T_E_N_T_S indirect
  113.      extents.
  114.  
  115.      If the inode is a block or character special inode, _d_i__u._d_i__n_u_m_e_x_e_n_t_s is
  116.      0, and _d_i__u._d_i__d_e_v contains a number identifying the device.
  117.  
  118.      If the inode is a symbolic link and _d_i__u._d_i__n_u_m_e_x_e_n_t_s is 0, the symbolic
  119.      link path string is stored in the extent descriptor area of the inode.  A
  120.      symbolic link is created with in-line data only when the data string fits
  121.      within the extent descriptor area, and the tuneable parameter eeeeffffssss____lllliiiinnnneeee is
  122.      non-zero (see _s_y_s_t_u_n_e(1M)).
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. iiiinnnnooooddddeeee((((4444))))                                                              iiiinnnnooooddddeeee((((4444))))
  137.  
  138.  
  139.  
  140. FFFFIIIILLLLEEEESSSS
  141.      /usr/include/sys/param.h
  142.      /usr/include/sys/types.h
  143.      /usr/include/sys/inode.h
  144.      /usr/include/sys/stat.h
  145.  
  146. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  147.      stat(2), efs(4), types(5).
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.